Update action-diff to not include the stable component ID #435
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR reworks how networking via
ActionDiff
works:ID
Component" that uniquely identifies entities across client and server, we introduce theActionDiffEvent
type, which has:ActionState
process_action_diffs
system in favor of a methodActionState.apply_diff(action_diff)
, to leave more flexibility to users over how to process the action-diffs (perform entity-mapping, etc.)I'm slightly confused about this: https://github.com/Leafwing-Studios/leafwing-input-manager/blob/main/src/systems.rs#L216: we detect if the button is Pressed/ValueChanged just based on the value?
What if we have a 'Value' type button that has a value of 1.0? We would then get a
Pressed
ActionDiff
, which seems incompatible?NOTE: it might actually be more efficient to have the ActionDiffEvent contains a
Vec<ActionDiff>
since we can compute all of them in one go for a given entity